package com.shimao.celnet.payment.model.response;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import javax.servlet.http.HttpServletRequest;

/**
 * 统一错误码异常处理
 * Created by ensure.xu on 2017/11/24.
 */
@RestControllerAdvice
public class ErrorInfoHandler_delete {
    @ExceptionHandler(value = ErrorInfoException.class)
    public ResponseJson errorHandlerOverJson(HttpServletRequest request,
                                             ErrorInfoException exception) {
        ErrorInfoInterface errorInfo = exception.getErrorInfo();
        ResponseJson result = new ResponseJson(errorInfo,"");
        return result;
    }
}
